html,
body,
#root {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
    'Noto Color Emoji';
}

.colorWeak {
  filter: invert(80%);
}

.ant-layout {
  min-height: 100vh;
}
.ant-pro-sider.ant-layout-sider.ant-pro-sider-fixed {
  left: unset;
}

// 修复侧边栏折叠时的间距问题
.ant-pro-layout {
  .ant-layout-sider-collapsed {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
  }

  // 确保折叠时内容区域正确调整
  .ant-layout-content {
    transition: margin 0.2s;
  }

  // 修复菜单项折叠时的间距
  .ant-pro-sider-menu {
    .ant-menu-item,
    .ant-menu-submenu-title {
      padding-left: 16px !important;

      .anticon {
        margin-right: 0;
      }
    }
  }

  // 折叠状态下菜单项居中显示
  .ant-layout-sider-collapsed {
    .ant-pro-sider-menu {
      .ant-menu-item,
      .ant-menu-submenu-title {
        padding: 0 !important;
        padding-left: 0 !important;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;

        .anticon {
          margin-right: 0 !important;
        }
      }
    }
  }
}

canvas {
  display: block;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 768px) {
  .ant-table {
    width: 100%;
    overflow-x: auto;
    &-thead > tr,
    &-tbody > tr {
      > th,
      > td {
        white-space: pre;
        > span {
          display: block;
        }
      }
    }
  }
}

.ant-list-item-extra {
  width: 60%;
}

.ant-card {
  // height: calc(100% - 60px);
  height: 100%;
}
.ant-card-body {
  height: calc(100% - 60px);
}
